package obj.day2.exam;

/**
 * @author げっしょく
 * @date 2021/7/16
 */
public class breeder {
    /*
     * 	6.定义饲养员类:breeder
     * 		行为:
     * 			饲养动物breed:包括吃饭和喝水
     */
    public void bree(Amail a){
        if(a instanceof forng){
            a.eat();
            a.water();
            ((forng) a).swimming();
        }else if(a instanceof sheep){
            a.eat();
            a.water();
        }else{
            a.eat();
            a.water();
            ((YouDog) a).swimming();
        }

    }
}
